/**
 * related to listRowTemplate.ui
 * 
 * @Author : chenglm
 * @Timestamp : 2016-07-26
 */
var root=ui("$");
var aLayout_moreType = ui("aLayout_moreType");
var do_Label_firstType = ui("do_Label_firstType");
var gridView_type = ui("gridView_type");
var listdata = mm("do_ListData");
gridView_type.bindItems(listdata);

var helperOpen = require("helper/open");

//设置数据绑定的映射关系
root.setMapping({
	"aLayout_moreType.tag":"id",
	"do_Label_firstType.text":"name",
	"do_Label_firstType.tag":"fontColor",
	"sericeIcon.source":"sericeIcon",
	"gridView_type.items":"childrenList"
});

root.on("dataRefreshed", function(){
	do_Label_firstType.fontColor = do_Label_firstType.tag;
});

aLayout_moreType.on("touch", function(data){
	var firstTypeId = aLayout_moreType.tag;
	helperOpen.open("source://view/homemaking/base/listType.ui", {"firstTypeId" : firstTypeId});
});
